package gew.table;

public class TableCellDimension {
    private final TableDimensionValue dim;
    private boolean visible;
    private final TableRow tableRow;

    public TableCellDimension(TableDimensionValue dim, boolean visible, TableRow tableRow) {
        this.dim = dim;
        this.visible = visible;
        this.tableRow = tableRow;
    }

    public TableDimensionValue getDim() {
        return dim;
    }

    public boolean isVisible() {
        return visible && dim.getTableDimension().isShowInTable();
    }

    public void setVisible(boolean visible) {
        this.visible = visible;
    }

    public TableRow getRow() {
        return tableRow;
    }
    
}
